#ifndef __ANGLE_H_
#define __ANGLE_H_


#include "zf_common_headfile.h"
#include "math.h"


/**
 * @brief 存储零漂数据
 * 
 */
typedef struct
{
    float x_data;
    float y_data;
    float z_data;
}gyro_offset_t;


/**
 * @brief 存储角速度和线加速度数据
 * 
 */
typedef struct
{
    float gyro_x;
    float gyro_y;
    float gyro_z;
    float acc_x;
    float acc_y;
    float acc_z;
}GyAc_param_t;

/**
 * @brief 储存四元数参数
 * @note 四元数表示旋转
 * 
 */
typedef struct
{
    float q0;
    float q1;
    float q2;
    float q3;
}quater_param_t;


/**
 * @brief 储存欧拉角参数
 * 
 */
typedef struct
{
    float roll;
    float pitch;
    float yaw;
}euler_param_t;

extern void Init_Gyro_Offset(void);
extern void Get_Angles_IMU(void);
extern void relative_angle(void);

extern GyAc_param_t reality;
extern euler_param_t euler_angle;
extern GyAc_param_t imu_data;

extern uint8_t now_angle_flag ;
extern double now_angle;

#endif